package com.liu.lab10.pojo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;



@Component("user")
public class User {
        @Value("2420710103")
        private long userId;
    @Value("刘小文")
        private String userName;
    @Value("123456")
        private String password;

    public User(long userId, String userName, String password, BirthDay birthDay) {
        this.userId = userId;
        this.userName = userName;
        this.password = password;
        this.birthDay = birthDay;
    }
    public  User() {}

    @Autowired
    @Qualifier("day")
    private BirthDay birthDay;

    public BirthDay getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(BirthDay birthDay) {
        this.birthDay = birthDay;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", birthDay=" + birthDay.toString() +
                '}';
    }
}
